import { AppGlobalService } from 'src/app/shared/service/app-global.service';
import { Component, Input, OnInit } from '@angular/core';

@Component({
  selector: 'app-common-nested-tag',
  templateUrl: './common-nested-tag.component.html',
  styleUrls: ['./common-nested-tag.component.scss'],
})
export class CommonNestedTagComponent implements OnInit {

  @Input() currentDataArray: any;
  constructor(
    public appGlobalService: AppGlobalService
  ) { }

  ngOnInit() {
   }
  changData(tagsItem) {
    if (tagsItem.shellDataId && tagsItem.shellDataId !== "0") {
      if (this.appGlobalService.getShellData(tagsItem.shellDataId)) {
        tagsItem = this.appGlobalService.getShellData(tagsItem.shellDataId);
        // this.appGlobalService.deleteShellData(tagsItem.shellDataId);
        return tagsItem;

      } else {
        return tagsItem;
      }

    } else {
      return tagsItem;
    }
  }
}
